package com.mcxx.modules.miniSalvation.family.entity;

import com.mcxx.modules.temporary.order.dto.ApplicationDTO;
import com.mcxx.util.Constant;
import com.mcxx.util.DateUtil;
import lombok.Data;

import java.io.Serializable;



@Data
public class BankEntity implements Serializable{
	private static final long serialVersionUID = 8333845790666387028L;


















































    private String id;

    private String areaCode;

    private String agentCountyCode;

    private String agentVillageCode;

  private  String familyId;

    private String memberId;

    private String agentOperator;

    private String agentBankPhone;

    private String businessType;

    private String payType;

    private String agentRelation;

    private String agentCensusType;

    private String agentSubsideProps;

    private String isAgent;

    private String status;

    private String masterSubsideProps;

    private String agentAccount;

    private String masterBankCode;

    private String agentAccountIdcard;

    private String agentBankCode;

    private String masterAccount;

    private String payOrgId;

    private String createTime;

    private String orgId;

    private String agentMemberAddress;

    private Integer agentMemberNumber;

    private String orderId;

    private String masterPhone;

    private String masterName;

    private String isUpdateName;

    private String bankName;


    private String familyRelation;

    private String apName;

    private String apIdcard;

    public static BankEntity convertBankInfoFromApplyInfo(ApplicationDTO applyDto) {
        BankEntity bankEntity = new BankEntity();
        bankEntity.setId(Constant.getUUID());
        bankEntity.setMasterAccount(applyDto.getApplyAccount());
        bankEntity.setMasterBankCode(applyDto.getApplyBankCode());
        bankEntity.setMasterSubsideProps(applyDto.getApplySubsideProps());
        bankEntity.setAreaCode(applyDto.getAreaCode());
        bankEntity.setCreateTime(DateUtil.getCurrentDate());
        bankEntity.setStatus(Constant.BankStatus.OK);
        bankEntity.setFamilyId(applyDto.getFamilyId());
        bankEntity.setMemberId(applyDto.getMemberId());
        bankEntity.setBusinessType(Constant.BusinessCode.LINSHI);
        bankEntity.setApIdcard(applyDto.getApplyIdcard());
        bankEntity.setAgentBankPhone(applyDto.getPhone());
        bankEntity.setApName(applyDto.getApplyName());
        return bankEntity;
    }
}
